﻿Imports System.Data.SqlClient
Imports UTNComputers.clsOrden_Servicio_Detalle
Public Class clsOrden_Servicio_Consumos
    Private mOscons_Id As Int32
    Private mOsdet_Id As Int32
    Private mProd_Id As Int32
    Private mNro_Serie As String
    Private mCod_Suc As Int32
    Private mProducto As clsCatalogo

    '/////////////////////////////////////////////////////////
    '/ Propiedades
    '/////////////////////////////////////////////////////////
    Public Property Oscons_Id() As Int32
        Get
            Return mOscons_Id
        End Get
        Set(ByVal value As Int32)
            If value > 0 And value < 2000000000 Then
                mOscons_Id = value
            Else
                Throw New Exception("No se puede utilizar el código consulmo de orden de servicio. El código debe ser mayor a cero (0).")
            End If
        End Set
    End Property
    Public Property Osdet_Id() As Int32
        Get
            Return mOsdet_Id
        End Get
        Set(ByVal value As Int32)
            If value > 0 And value < 2000000000 Then
                mOsdet_Id = value
            Else
                Throw New Exception("No se puede utilizar el código de servicio. El código debe ser mayor a cero (0).")
            End If
        End Set
    End Property
    Public Property Prod_Id() As Int32
        Get
            Return mProd_Id
        End Get
        Set(ByVal value As Int32)
            If value > 0 And value < 2000000000 Then
                mProd_Id = value
            Else
                Throw New Exception("No se puede utilizar el código de artículo. El código debe ser mayor a cero (0).")
            End If
        End Set
    End Property
    Public Property Nro_Serie() As String
        Get
            Return mNro_Serie.Trim.ToUpper
        End Get
        Set(ByVal value As String)
            mNro_Serie = value.Trim.ToUpper
        End Set
    End Property
    Public Property Cod_Suc() As Int32
        Get
            Return mCod_Suc
        End Get
        Set(ByVal value As Int32)
            If value > 0 And value < 2000000000 Then
                mCod_Suc = value
            Else
                Throw New Exception("Codigo de sucursal incorrecto")
            End If
        End Set
    End Property
    Public Property Producto() As clsCatalogo
        Get
            Return mProducto
        End Get
        Set(ByVal value As clsCatalogo)
            mProducto = value
        End Set
    End Property
    '/////////////////////////////////////////////////////////
    '/ Métodos de la Clase
    '/////////////////////////////////////////////////////////

    '---------------------------------------------------------------------
    ' Constructor de la Clase
    '---------------------------------------------------------------------
    Public Sub New()

        MyBase.New()

    End Sub
    '---------------------------------------------------------------------
    ' Destructor de la Clase
    '---------------------------------------------------------------------
    Public Sub Dispose()

        MyBase.Finalize()

    End Sub

End Class
